A typical query that is generated in a business intelligence (BI) system asks for the values of some measures that are to be evaluated in the context of some dimension attributes. The measures may include, for example, sum of sales, year-to-date sales, year-over-year growth, or the like, while the dimension attributes may include, for example, product categories, fiscal years, store locations, or the like. The execution of BI queries with MOLAP (multidimensional online analytical processing) like semantics would generate empty measure values if there is no record in a fact table for a given combination of dimension attributes. For example, if there were no sales of air conditioners in January, a measure SumOfSales would return an empty value for product=“air conditioner” and month=“January.” A very common filter condition for such queries asks that only rows that have at least one non-empty measure be included in the result set. For example, FIG. 1 depicts a query 100 that includes such a filter condition. In particular, as shown in FIG. 1, query 100 includes a plurality of measure expressions 1021-102n that are to be evaluated in the context of some dimension attributes specified by a dimension sub-query or sub-queries 104. A filter 106 having a filter condition 108 is applied 110 to the measure expressions so evaluated, wherein filter condition 106 specifies that a record must contain at least one measure that is not empty to remain in the result set.
A straightforward strategy for executing a query such as query 100 is to calculate the value of each and every measure in the current dimension context and then filter away rows with only empty measure values afterwards. This naïve approach can be very slow as the combination of dimension attributes produces a query space that is substantially larger than the subspace in which the measures have real values. For example, a user may wish to calculate a year-to-date sales measure against the cross join of products and customers. Since a typical customer will purchase only a small subset of all available products, it would be extremely inefficient to calculate the year-to-date sales measure for each and every combination of product and customer and then throw away empty results afterwards.
Certain conventional BI systems utilize fact-centric modeling. The join types between fact tables and dimensions are set in the model. While the use of such a model enables efficient processing of queries that only care about existing records in the fact table, it makes answering common BI questions, such as those involving time series calculations, difficult. Such BI systems often resort to a data densification technique that requires model designers to introduce additional fake fact tables.